<template>
  <div>
    <div v-for="(item,index) in articleList" class="">
      <div @click="toLookArticle(item.id)">{{item.title}}</div>
    </div>
  </div>
</template>
<script>
  import {URI_GETALLARTICLELIST} from 'src/const/uri'
  export default {
    data() {
      return {
        page:1,
        pageSize:10,
        articleList:[]
      }
    },
    created() {
      this.getArticle();
    },
    mounted() {

    },
    methods: {
      getArticle() {
        this.$ajax.get(URI_GETALLARTICLELIST, {
          page:this.page,
          pageSize:this.pageSize
        }, res => {
          this.articleList= res.data;
        });
      },
      toLookArticle(id){
        this.$router.push('/lookArticle/' + id)
      }
    }
  }
</script>
